package ink.yql.dao;

import ink.yql.model.SolveLock;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SolveLockDao {

    @Select("select * from solve_lock where pid = pid order by slmoney")
    List<SolveLock> getByPid(@Param("pid") Integer pid);

    @Insert("insert into solve_lock(pid,slmoney,slpromise) values (#{pid} ,#{slmoney} ,#{slpromise}     )")
    Integer addOne(SolveLock solveLock);
}
